import { GET, DEL, POST, PUT } from '../request/index.js'

export const userApi = {
  getUserList: (params) => POST('/st-user/user/page', params),
  getUserInfo: (id) => GET(`/st-user/user/info/${id}`),
  addUser: (data) => PUT('/st-user/user', data),
  updateUser: (data) => POST('/st-user/user', data),
  deleteUser: (id) => DEL(`/st-user/user/${id}`),
   batchDeleteUsers: (ids) => DEL(`/st-user/user/${ids}`),
  DeleteUsersChoose: (ids) => DEL(`/st-user/user?ids=${ids}`),
  resetPassword: (id) => POST(`/st-user/user/pwd/${id}`),
  getUserPinyin: (name) => POST(`/st-user/user/login_name?name=${encodeURIComponent(name)}`),
  getRolesList: () => GET('/st-user/role/list'),
  updatePwd: (data) => POST(`/st-user/user/pwd/new`,data)
};

//这个js 不要再帮我修改了